#include<stdio.h>
#include<math.h>

int main()
{
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    
    int distance_x, distance_y;
    distance_x = abs(c - a);
    distance_y = abs(d - b);
    printf("%d\n", distance_x + distance_y);
    return 0;
}
